
<div class="page-content">
    <div class="col-sm-6 pull-right">
        <span class="btn btn-sm btn-primary pull-right" onclick="javascript:window.location.href = 'info'">
            添加
            <i class="icon-reply icon-only"></i>
        </span>
    </div>
    <div class="page-header">
        <h1>
            {:model('menu')->getName()}
        </h1>
    </div><!-- /.page-header -->

    <div class="row">
        <div class="col-xs-12">
            <!-- PAGE CONTENT BEGINS -->
            <div class="row">
                <div class="col-xs-12">
                    <table id="simple-table" class="table  table-bordered table-hover">
                        <thead>
                        <tr>
                            <th>id</th>
                            <th>公众号名称</th>
                            <th>公众号类型</th>
                            <th>渠道名称</th>
                            <th>关键词</th>
                            <th>静关注数</th>
                            <th>新增关注数</th>
                            <th>取消关注数</th>
                            <th>查看二维码</th>
                            <th>添加时间</th>
                            <th>操作</th>
                        </tr>
                        </thead>

                        <tbody>
                        {volist name="lists" id="vo"}
                        <tr>
                            <td>{$vo.wechat_channel_id}</td>
                            <td>{$vo.appname}</td>
                            <td>{if condition="$vo.app_type == 0"}订阅号{else/}服务号{/if}</td>
                            <td>{$vo.channel_name}</td>
                            <td>{$vo.reply_keywords}</td>
                            <td>{$vo.static_num}</td>
                            <td>{$vo.new_num}</td>
                            <td>{$vo.cancel_num}</td>  <!--qrcode?id={$vo.wechat_channel_id} -->
                            <td><a href='javascript:void(0)' onclick=" return ck({$vo.wechat_channel_id})">查看二维码</a></td>
                            <td>{$vo.addtime}</td>
                            <td>
                                <div class="hidden-sm hidden-xs btn-group">

                                    <a href='{:url("info","id=$vo[wechat_channel_id]")}'
                                    <span class="btn btn-xs btn-info">
                                                <i class="ace-icon fa fa-pencil bigger-120"></i>
                                            </span>
                                    </a>
                                    <a href='javascript:void(0)' onclick="return alert_del('{:url(\"del\",\"id=$vo[wechat_channel_id]\")}', '删除后所有的二维码将失效『 id={$vo.wechat_channel_id} 』这条记录吗？');"
                                    <span class="btn btn-xs btn-danger">
                                                <i class="ace-icon fa fa-trash-o bigger-120"></i>
                                            </span>
                                    </a>
                                    <a href='{:url("excel","id=$vo[wechat_channel_id]")}'>导出粉丝
                                </a>
                                </div>
                            </td>
                        </tr>
                        {/volist}
                        </tbody>
                    </table>
                    {$lists->render()}
                </div><!-- /.span -->
            </div><!-- /.row -->

            <!-- PAGE CONTENT ENDS -->
        </div><!-- /.col -->
    </div><!-- /.row -->
</div><!-- /.page-content -->
<script type="text/javascript">
    $(function () {
        $(".dr").click(function () {
            var str = $("#thisfile").val();
            if (str == '') {
                alert('要导入的东西不能为空');
                return false;
            }
        })
    })

    function makeThisfile() {
        $('#thisfile').click();
    }
    function ck(id){
       // alert(id)
        $.ajax({
            type:'post',
            url:'qrcode',
            data:{id:id},
            success:function (data) {
              //  alert(data)
              alert_img(data,'300','300','二维码查看')
             //   swal({
               //     title: data,
                 //   html: $('<div>').addClass('some-class').text('二维码查看')
             //   });
            }
        }) 
        // swal({
        //     title: 'jQuery HTML example',
        //     html: $('<div>').addClass('some-class').text('jQuery is everywhere.')
        // });
    }
    //file表单选中文件时,让file表单的val展示到showname这个展示框
    $('#thisfile').change(function () {
        $('#showname').val($(this).val())
    })
    $('.examples .html-jquery button').on('click', function() {
        $.ajax({
            type:'post',
            url:'qrcode',
            data:{id:id}
        })
        swal({
            title: '二维码查看',
            html: $('<div>').addClass('some-class').text('jQuery is everywhere.')
        });
    });

</script>
<style type="text/css">
    #browse {
        border: 1px solid #ccc;
        border-radius: 4px;
        background-color: #2c9a8a;
        color: #fff;
    }
</style>


